package com.aya.ite.itefinal;

import java.util.Hashtable;
import java.util.Iterator;

public class Coffee implements Menu{
    private Hashtable<String, MenuItem> menuItems = new Hashtable<>();

    public boolean addMenu(MenuItem menuItem) {
        return menuItems.put(menuItem.getName(), menuItem) == null;
    }

    public Iterator<MenuItem> createIterator() {
        return menuItems.values().iterator();
    }
}
